package com.example.ddcoursequery;

import com.app.model.Course;

import java.util.List;

/**
 * 保存所有老师的缓存列表
 */
public class CacheTeacher {
    public static List<AppTeacher> teacherList;
    public static List<List<AppCourse>> courseList;
    public static List<String> titleList;

    //查取缓存中工号为teacher_id的老师的课表
    public static List<Course> getListCourse(String teacher_id){
        List<Course> courseList = null;
        for (AppTeacher appTeacher :teacherList) {
            if(teacher_id.equals(appTeacher.getTeacher_id())){
                courseList = appTeacher.getCourseList();
            }
        }
        return courseList;
    }

}
